<?php

namespace App\Providers;

use Phalcon\Logger\Adapter\File as LoggerFile;

class LogServiceProvider extends AbstractServiceProvider
{
    /**
     * The Service name.
     * @var string
     */
    protected $serviceName = 'logger';

    /**
     * Register application service.
     *
     * @return void
     */
    public function register()
    {
        $this->di->setShared(
			$this->serviceName, 
			function () {
				 $log = new LoggerFile("../storage/logs/app.log");
				 return $log;
			}
		);
    }
}
